1500
How can I add a Zero-Lenght bar
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2010,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("M1");
	var_Items->AddBar(h1,"Milestone",COleDateTime(2010,9,29,0,00,00).operator DATE(),COleDateTime(2010,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
spG2antt1->EndUpdate();

1499
Can I use bars like Milestone (Zero-Length bar) in SchedulePDM

// BarResizing event - Occurs when a bar is moving or resizing.
void OnBarResizingG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->SchedulePDM(Item,Key)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%3",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToItems);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat1 = spG2antt1->GetConditionalFormats()->Add(L"%3 = 0",vtMissing);
	var_ConditionalFormat1->PutForeColor(RGB(196,196,196));
	var_ConditionalFormat1->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x3));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2010,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("M1");
	var_Items->AddBar(h1,"Milestone",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	long h2 = var_Items->AddItem("T1");
	var_Items->AddBar(h2,"Task",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarEndInclusive,COleDateTime(2010,9,27,0,00,00).operator DATE());
	var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Items->AddLink("L1",h1,"",h2,"");
	long h3 = var_Items->AddItem("T2");
	var_Items->AddBar(h3,"Task",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h3,"",EXG2ANTTLib::exBarEndInclusive,COleDateTime(2010,9,27,0,00,00).operator DATE());
	var_Items->PutItemBar(h3,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Items->AddLink("L2",h1,"",h3,"");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkPDMWorkingDelay,long(5));
	long h4 = var_Items->AddItem("M3");
	var_Items->AddBar(h4,"Milestone",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h4,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_FALSE);
	var_Items->AddLink("L3",h1,"",h4,"");
	var_Items->PutLink("L3",EXG2ANTTLib::exLinkPDMWorkingDelay,long(5));
	var_Items->SchedulePDM(0,"");
spG2antt1->EndUpdate();

1498
How can I prevent vertical scrolling when user clicks the overview part of the control

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->EndUpdate();

1497
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (recommended for bars with exBarKeepWorkingCount ) What I can do

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutShowEmptyBars(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,21,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEndInclusive,var_Items->GetItemBar(h,"",EXG2ANTTLib::exBarStart));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,21,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEndInclusive,COleDateTime(2006,9,25,0,00,00).operator DATE());
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
spG2antt1->EndUpdate();

1496
How can I display the end date to be the last visible date of task, instead the next day

// BarResize event - Occurs when a bar is moved or resized.
void OnBarResizeG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->SchedulePDM(Item,Key);
}

// BarResizing event - Occurs when a bar is moving or resizing.
void OnBarResizingG2antt1(long   Item,VARIANT   Key)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->SchedulePDM(Item,Key);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutHeaderHeight(36);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column->PutHTMLCaption(L"<b>End</b><br>Inclusive");
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x2));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddLink("link",h1,"",h2,"");
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Items->SchedulePDM(0,"");
spG2antt1->EndUpdate();

1495
How do I hide the selection
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(-8));
spG2antt1->EndUpdate();

1494
How do I access the cells, or how do I get the values in the columns
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"SubItem 1.1");
	var_Items->PutCellValue(h,long(2),"SubItem 1.2");
	OutputDebugStringW( _bstr_t(var_Items->GetCellValue(h,long(1))) );

1493
Is there any function I can use to indicate the Now() when using the ComputedFields, CondtionalFormats, ...
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Now")))->PutComputedField(L"date(``)");
spG2antt1->GetItems()->AddItem("");

1492
How can I get the start and end points of the bar once the BarResize event occurs
// BarResize event - Occurs when a bar is moved or resized.
void OnBarResizeG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Start: " );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarStart)) );
	OutputDebugStringW( L"End: " );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarEnd)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
spG2antt1->GetColumns()->Add(L"Types");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1491
My chart displays hours, the question would be if possible to let user resizes the bars up to 1/2 hour, or a half an hour
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute);
	var_Chart->PutResizeUnitCount(30);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Task");
	var_Items->AddItem("Task");
	var_Items->AddItem("Task");
	var_Items->AddItem("Task");
	var_Items->AddItem("Task");
spG2antt1->EndUpdate();

1490
How can I show the dates in the title
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->GetLevel(0)->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
spG2antt1->EndUpdate();

1489
If I vertically scroll the control the image flows fluently. But when I scroll on the horizontal chart's scrollbar the images only shows after I release the click button. Can I make it scroll fluently like the vertical scrollbar
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,0);
spG2antt1->GetChart()->PutToolTip(L"");

1488
How can I programmatically add a bar during the CreateBar event
// CreateBar event - Fired when the user creates a new bar.
void OnCreateBarG2antt1(long   Item,DATE   DateStart,DATE   DateEnd)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		_variant_t k = var_Items->GetItemBar(Item,"",EXG2ANTTLib::exBarsCount);
		var_Items->AddBar(Item,"Order",DateStart,DateEnd,k,"your text");
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(Item,"",EXG2ANTTLib::exBarsCount)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarManual);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->Copy(L"Task",L"Order");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
spG2antt1->EndUpdate();

1487
How can I move more bars by code
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarMove,long(1));
	var_Items->PutItemBar(0,"<A*>",EXG2ANTTLib::exBarMove,long(1));
	var_Items->PutItemBar(0,"<B*>",EXG2ANTTLib::exBarMove,long(1));

1486
How can I move a bar by code
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarMove,long(1));

1485
How can I clip the notes to the items zone only

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(vtMissing);
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"1",vtMissing);
EXG2ANTTLib::INotesPtr var_Notes = spG2antt1->GetChart()->GetNotes();
	EXG2ANTTLib::INotePtr var_Note = var_Notes->Add("1",spG2antt1->GetItems()->GetItemByIndex(1),"1",L"<img>2</img>");
		var_Note->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
		var_Note->PutPartBorderSize(EXG2ANTTLib::exNoteEnd,0);
		var_Note->ClearPartBackColor(EXG2ANTTLib::exNoteEnd);
		var_Note->PutPartCanMove(EXG2ANTTLib::exNoteEnd,VARIANT_TRUE);
		var_Note->PutRelativePosition(double(0.5));
		var_Note->PutPartVOffset(EXG2ANTTLib::exNoteEnd,-36);
	var_Notes->PutClipTo(EXG2ANTTLib::exNotesClipToItems);
spG2antt1->EndUpdate();

1484
How can I put two bars of various types, in the event of conflict do not coincide

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutOverlaidGroup(L"NewTask");
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"NewTask");
		var_Bar1->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar1->PutOverlaidGroup(L"Task");
		var_Bar1->PutColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1","A1");
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3","A3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A4","A4");
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1483
How can I run trigger an event which, after clicking on the item/bar gives the key/name or item id
// MouseDown event - Occurs when the user presses a mouse button.
void OnMouseDownG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long item = spG2antt1->GetItemFromPoint(-1,-1,column,hit);
	_variant_t key = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	OutputDebugStringW( L"Item:" );
	OutputDebugStringW( L"item" );
	OutputDebugStringW( L"Key:" );
	OutputDebugStringW( L"key" );
	OutputDebugStringW( L"CellValue(i,0):" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetCellValue(item,long(0))) );
	spG2antt1->GetItems()->PutItemBar(item,key,EXG2ANTTLib::exBarColor,long(255));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
spG2antt1->EndUpdate();

1482
How can I change the check-boxes appearance

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,"XP:Button 3 12");
	var_Appearance->Add(2,"XP:Button 3 11");
	var_Appearance->Add(3,"XP:Button 3 10");
spG2antt1->PutCheckImage(EXG2ANTTLib::Unchecked,16777216);
spG2antt1->PutCheckImage(EXG2ANTTLib::Checked,33554432);
spG2antt1->PutCheckImage(EXG2ANTTLib::PartialChecked,50331648);

1481
How can I change the color for the control's split bar (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->PutBackground(EXG2ANTTLib::exSplitBar,RGB(0,0,1));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(64);
	var_Chart->PutOverviewHeight(48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll);
spG2antt1->EndUpdate();

1480
Is it possible to display ONLY the working hours

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel(long(4096));
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<%hh%>");
		var_Level1->PutCount(6);
	var_Chart->PutUnitWidth(26);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutNonworkingHours(15728895);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);

1479
How can I display the end of the day in the chart's header

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel(long(4096));
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<%hh%>");
		var_Level1->PutCount(6);
		var_Level1->PutReplaceLabel(L"08",L"<b>8</b> <font ;6>am");
		var_Level1->PutReplaceLabel(L"14",L"<b>8</b> <font ;6>pm");
	var_Chart->PutUnitWidth(26);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutNonworkingHours(15728895);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);

1478
How can I display the +/- expanding buttons in the chart section

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutIndent(13);
spG2antt1->PutHasButtons(EXG2ANTTLib::exWPlus);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2010,12,25,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutColumnsFormatLevel(L"0");
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelForeColor(spG2antt1->GetSelForeColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 1"),"Task",COleDateTime(2011,1,2,0,00,00).operator DATE(),COleDateTime(2011,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 2"),"Task",COleDateTime(2011,1,4,0,00,00).operator DATE(),COleDateTime(2011,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 3"),"Task",COleDateTime(2011,1,7,0,00,00).operator DATE(),COleDateTime(2011,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1477
Is it possible to display the columns in the chart aligned to the right

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutColumnsFormatLevel(L"|,1:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1476
How can I display a border in the chart

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::CenterAlignment);
	var_Column->PutDef(EXG2ANTTLib::exCellForeColor,long(255));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutColumnsFormatLevel(L"1:52,\\\"\\\"[bg=255]:2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1475
How can I change the font to display the columns in the chart (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1474
How can I change the font to display the columns in the chart (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1");
	/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'stdole' for the library: 'OLE Automation'

	#import <stdole2.tlb>
*/
	var_Chart->PutColumnsFont(IFontDispPtr(((stdole::FontPtr)(spG2antt1->GetFont()))));
	stdole::FontPtr var_StdFont = var_Chart->GetColumnsFont();
		var_StdFont->PutSize(_variant_t(long(12)));
		var_StdFont->PutName(L"Tahoma");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1473
How can I change the column's background color when it is displayed on the chart (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=255]:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1472
How can I change the column's background color when it is displayed on the chart (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Key")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutDef(EXG2ANTTLib::exCellBackColor,long(15790320));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Split",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1471
Can the chart display any column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1:52,|,2:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1470
Is it possible to display a check-box column on the chart

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);

1469
Is it possible to disable the cell's editor context menu
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::EditType);
	var_Editor->PutOption(EXG2ANTTLib::exEditAllowContextMenu,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(20));

1468
How can I find a value in a drop down editor
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(1,L"DDList 1",vtMissing);
	var_Editor->AddItem(2,L"DDList 2",vtMissing);
	var_Editor->AddItem(3,L"DDList 3",vtMissing);
EXG2ANTTLib::IEditorPtr var_Editor1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDown")))->GetEditor();
	var_Editor1->PutEditType(EXG2ANTTLib::DropDownType);
	var_Editor1->AddItem(1,L"DDType 1",vtMissing);
	var_Editor1->AddItem(2,L"DDType 2",vtMissing);
	var_Editor1->AddItem(3,L"DDType 3",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(->AddItem(long(1)),long(1),spG2antt1->GetColumns()->GetItem(long(1))->GetEditor()->GetFindItem(long(1)));
	var_Items->PutCellValue(->AddItem(long(2)),long(1),spG2antt1->GetColumns()->GetItem(long(1))->GetEditor()->GetFindItem(long(2)));

1467
What is the difference between DropDownType and DropDownListType
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(1,L"First item",vtMissing);
	var_Editor->AddItem(2,L"Second item",vtMissing);
	var_Editor->AddItem(3,L"Third item",vtMissing);
EXG2ANTTLib::IEditorPtr var_Editor1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDown")))->GetEditor();
	var_Editor1->PutEditType(EXG2ANTTLib::DropDownType);
	var_Editor1->AddItem(1,L"First item",vtMissing);
	var_Editor1->AddItem(2,L"Second item",vtMissing);
	var_Editor1->AddItem(3,L"Third item",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),"Any");
	var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),"Any");

1466
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 3)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(32);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(2,"CP:1 -2 -2 2 2");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->PutSelBarColor(0x2ff0000);
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x1000000);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,6,0,00,00).operator DATE(),COleDateTime(2002,1,10,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,11,0,00,00).operator DATE(),COleDateTime(2002,1,14,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1465
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(32);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(2,"CP:1 -2 -2 2 2");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->PutSelBarColor(0x2000000);
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x1000000);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,6,0,00,00).operator DATE(),COleDateTime(2002,1,10,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,11,0,00,00).operator DATE(),COleDateTime(2002,1,14,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1464
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(32);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB") +
"iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" +
"YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" +
"xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" +
"F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==");
	var_Appearance->Add(2,"CP:1 -2 -2 2 2");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->PutSelBarColor(0x2000000);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,6,0,00,00).operator DATE(),COleDateTime(2002,1,10,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,11,0,00,00).operator DATE(),COleDateTime(2002,1,14,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1463
How can I load my table from an Access 2007, using ADO
// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->EndUpdate();

1462
Is it possible to enumerate the links without enumerating them

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,14,0,00,00).operator DATE(),COleDateTime(2001,1,16,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->AddLink("L3",h3,"K3",h4,"K4");
	var_Items->PutLink("<L*>",EXG2ANTTLib::exLinkShowDir,VARIANT_FALSE);

1461
How can I display a vertical line in the chart
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
void OnClickG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
		var_Chart->PutMarkNowColor(RGB(255,0,0));
		var_Chart->PutMarkNow(var_Chart->GetDateFromPoint(-1,-1));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2012,3,13,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkNowColor(RGB(0,0,0));
	var_Chart->PutMarkNowWidth(3);
	var_Chart->PutUnitWidth(32);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);

1460
How can I use the MarkNowColor to mark a time line different then the time on the machine

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2012,3,13,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->GetLevel(0)->PutLabel(long(1048576));
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1);
		var_Level->PutLabel("<%ss%>");
		var_Level->PutCount(15);
	var_Chart->PutMarkNowColor(RGB(255,0,0));
	var_Chart->PutMarkNowWidth(3);
	var_Chart->PutMarkNow(COleDateTime(2012,3,13,0,03,20).operator DATE());

1459
Is it possible to show the current date time using a delay

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->GetLevel(0)->PutLabel(long(1048576));
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1);
		var_Level->PutLabel("<%ss%>");
		var_Level->PutCount(15);
	var_Chart->PutMarkNowColor(RGB(0,0,255));
	var_Chart->PutMarkNowWidth(3);
	var_Chart->PutMarkNowDelay(0.00069444);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2008,1,1,0,00,00).operator DATE(),COleDateTime(2018,1,1,0,00,00).operator DATE(),vtMissing,vtMissing);

1458
What are the options to show the links between bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddItem("");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,12,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkShowRound,long(-1));
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,18,0,00,00).operator DATE(),COleDateTime(2001,1,20,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->AddLink("L3",h3,"K3",h4,"K4");
	var_Items->PutLink("L3",EXG2ANTTLib::exLinkShowRound,long(1));
	var_Items->AddItem("");
	long h5 = var_Items->AddItem("Task 5");
	var_Items->AddBar(h5,"Task",COleDateTime(2001,1,22,0,00,00).operator DATE(),COleDateTime(2001,1,24,0,00,00).operator DATE(),"K5",vtMissing);
	var_Items->AddLink("L4",h4,"K4",h5,"K5");
	var_Items->PutLink("L4",EXG2ANTTLib::exLinkShowRound,long(2));

1457
Is it possible to specify the link between bars to be a wider line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksStyle(EXG2ANTTLib::exLinkSolid);
	var_Chart->PutLinksWidth(2);
	var_Chart->PutLinksColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");

1456
Is it possible to create a link between the two specified bars so that the link was a straight line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkStyle,long(0));
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkWidth,long(2));
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkColor,long(255));
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkShowRound,long(2));
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");

1455
I associate the bars with my columns, Start and End, but can not get it working for bars with non-empty keys. What am I doing wrong

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A","A");
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,6,0,00,00).operator DATE(),COleDateTime(2002,1,10,0,00,00).operator DATE(),"A","A");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"B","B");
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1454
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutScrollRange(EXG2ANTTLib::exStartDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutScrollRange(EXG2ANTTLib::exEndDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutNonworkingHours(12582975);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);
	var_Chart->GetLevel(0)->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
	var_Chart->PutUnitWidth(18);
	var_Chart->PutPaneWidth(VARIANT_TRUE,294);
	var_Chart->PutScrollBar(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exDisableSplitter);
spG2antt1->EndUpdate();

1453
Is it possible to count only a specified type of bars without enumerating them
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Progress",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"P3","P3");
	OutputDebugStringW( L"K*" );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<K*>",EXG2ANTTLib::exBarsCount)) );
	OutputDebugStringW( L"K* P*" );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<K* P*>",EXG2ANTTLib::exBarsCount)) );

1452
How can I count or get the numbers of the bars in the chart
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	OutputDebugStringW( L"All" );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	OutputDebugStringW( L"A*" );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<A*>",EXG2ANTTLib::exBarsCount)) );
	OutputDebugStringW( L"K*" );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<K*>",EXG2ANTTLib::exBarsCount)) );

1451
Is it possible to remove only specified bars from ALL items at once
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	var_Items->RemoveBar(0,"<K*>");

1450
How can I remove all bars from the chart (method 2)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	var_Items->ClearBars(0);

1449
How can I remove all bars from the chart (method 1)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	var_Items->RemoveBar(0,"<*>");

1448
Is it possible to update at once a property for several bars without enumerating them
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	var_Items->PutItemBar(0,"<K*>",EXG2ANTTLib::exBarColor,long(255));

1447
Is it possible to update at once a property of ALL bars without enumerating them
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A2","A2");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","K3");
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarColor,long(255));

1446
How do I prevent selecting a new item when selecting a bar
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutSelectOnClick(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutSelectItem(var_Items->GetFirstVisibleItem(),VARIANT_TRUE);
spG2antt1->EndUpdate();

1445
Is it possible to find out all incoming bars ( recursively )

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarIncomingBarsAllDebug)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1444
How do I find the incoming bars
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarIncomingBarsDebug)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1443
Is it possible to find out all incoming links ( recursively ). Incoming link is a link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarIncomingLinksAllAsString)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1442
How do I find the incoming links. Incoming link is link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarIncomingLinksAsString)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1441
Is it possible to find out all outgoing bars ( recursively )
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarOutgoingBarsAllDebug)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1440
How do I find the outgoing bars
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarOutgoingBarsDebug)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1439
Is it possible to find out all outgoing links ( recursively ). Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarOutgoingLinksAllAsString)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1438
How do I find the outgoing links. Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarOutgoingLinksAsString)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B","B");
	var_Items->AddLink("L1",h1,"A",h2,"B");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"C","C");
	var_Items->AddLink("L2",h2,"B",h3,"C");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"D","D");
	var_Items->AddLink("L3",h1,"A",h4,"D");
spG2antt1->EndUpdate();

1437
How do I select a bar using the right-click
// MouseDown event - Occurs when the user presses a mouse button.
void OnMouseDownG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_FALSE);
		var_Items->PutItemBar(spG2antt1->GetItemFromPoint(-1,-1,c,hit),spG2antt1->GetChart()->GetBarFromPoint(-1,-1),EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
spG2antt1->EndUpdate();

1436
How can I add or change the padding (spaces) for captions in the control's header
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Padding-Left")))->PutDef(EXG2ANTTLib::exHeaderPaddingLeft,long(18));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Padding-Right")));
	var_Column->PutDef(EXG2ANTTLib::exHeaderPaddingRight,long(18));
	var_Column->PutHeaderAlignment(EXG2ANTTLib::RightAlignment);
spG2antt1->EndUpdate();

1435
Do you have any plans to add cell spacing and cell padding to the cells

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Padding-Left")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(18));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"No-Padding")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Empty")))->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item A.1"),long(1),"Item A.2");
	var_Items->PutCellValue(var_Items->AddItem("Item B.1"),long(1),"Item B.2");
	var_Items->PutCellValue(var_Items->AddItem("Item C.1"),long(1),"Item C.2");
spG2antt1->EndUpdate();

1434
Can I display somehow the filter just on the top of the list, with an editor associated to each column

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Locked:" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetIsItemLocked(Item)) );
	EXG2ANTTLib::IColumnPtr var_Column = spG2antt1->GetColumns()->GetItem(ColIndex);
		var_Column->PutFilter(L"NewValue");
		var_Column->PutFilterType(EXG2ANTTLib::exPattern);
	spG2antt1->ApplyFilter();
}

// MouseUp event - Occurs when the user releases a mouse button.
void OnMouseUpG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Edit(spG2antt1->GetItems()->GetLockedItem(EXG2ANTTLib::exTop,0));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,2);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::EditType);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutItemHeight(h,4);
	var_Items->PutItemDivider(h,0);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);

1433
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event.
void OnEventG2antt1(long   EventID)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spG2antt1->GetEventParam(-2)) );
}


1432
I need to specify the start and end dates of the bar to be the same, but to keep count of the working units. Is it possible

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutShowEmptyBars(1);
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,21,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
spG2antt1->EndUpdate();

1431
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (NOT recommended for bars with exBarKeepWorkingCount ) What I can do

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutShowEmptyBars(1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,21,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,22,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1430
I need my chart to display the end date with on day less. How can I do this (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutNonworkingDays(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1429
Is it possible to change the width of a specified time unit

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	var_Chart->GetDefaultInsideZoomFormat()->PutBackColorChart(RGB(255,0,255));
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		EXG2ANTTLib::IInsideZoomPtr var_InsideZoom = var_InsideZooms->Add(COleDateTime(2008,1,15,0,00,00).operator DATE());
			var_InsideZoom->PutAllowInsideFormat(VARIANT_FALSE);
			var_InsideZoom->PutWidth(128);
spG2antt1->EndUpdate();

1428
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	var_Chart->GetDefaultInsideZoomFormat()->PutBackColorChart(RGB(255,0,0));
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		var_InsideZooms->Add(COleDateTime(2008,1,15,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();

1427
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 1)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkSelectDateColor(0x7fff0000);
	var_Chart->PutSelectLevel(1);
	var_Chart->PutSelectDate(COleDateTime(2008,1,15,0,00,00).operator DATE(),VARIANT_TRUE);
spG2antt1->EndUpdate();

1426
How can I change the layout of my columns when using the exCRD

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutDefaultItemHeight(36);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column1")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::EditType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column2")));
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::EditType);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column3")))->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column2->PutFormatLevel(L"(0/1),2");
		var_Column2->PutDef(EXG2ANTTLib::exCellFormatLevel,var_Column2->GetFormatLevel());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
spG2antt1->EndUpdate();

1425
How can I overlaid a single bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidGroup(L"OTask");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsNone);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"OTask");
		var_Bar1->PutOverlaidGroup(L"Task");
		var_Bar1->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStrict | EXG2ANTTLib::exOverlaidBarsCascade));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"OTask",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarColor,long(255));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1424
How can I use the exOverlaidBarsCascade, exBarOverlaidKey

// CreateBar event - Fired when the user creates a new bar.
void OnCreateBarG2antt1(long   Item,DATE   DateStart,DATE   DateEnd)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->PutItemBar(Item,"newbar",EXG2ANTTLib::exBarOverlaidKey,"Level0");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarOverlaidKey,"Level0");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarOverlaidKey,"Level0");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarOverlaidKey,"Level1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	var_Items->PutItemBar(h,"A4",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBar(h,"A4",EXG2ANTTLib::exBarOverlaidKey,"Level1");
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1423
How can I use the exOverlaidBarsStack+exOverlaidBarsStackAutoArrange

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1422
How can I use the exOverlaidBarsStack

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1421
How can I use the exOverlaidBarsIntersect

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsIntersect);
		var_Bar->PutOverlaid(EXG2ANTTLib::exOverlaidBarsIntersect,"Progress");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1420
How can I use the exOverlaidBarsOffset

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsOffset);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Default");
	long h = var_Items->AddItem("Overlaid");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"A4",vtMissing);
	h1 = var_Items->AddItem("Default");
spG2antt1->EndUpdate();

1419
Is it possible to specify the end of the project when using the SchedulePDM method
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"SS");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(0));
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(0));
	var_Items->PutDefSchedulePDM(EXG2ANTTLib::exPDMScheduleType,long(2));
	var_Items->PutDefSchedulePDM(EXG2ANTTLib::exPDMScheduleDate,COleDateTime(2001,1,8,0,00,00).operator DATE());
	var_Items->SchedulePDM(0,"K1");
spG2antt1->EndUpdate();

1418
Is it possible to specify the start of the project when using the SchedulePDM method
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"SS");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(0));
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(0));
	var_Items->PutDefSchedulePDM(EXG2ANTTLib::exPDMScheduleType,long(1));
	var_Items->PutDefSchedulePDM(EXG2ANTTLib::exPDMScheduleDate,COleDateTime(2001,1,8,0,00,00).operator DATE());
	var_Items->SchedulePDM(0,"K1");
spG2antt1->EndUpdate();

1417
How can I change the caption or the addition information being displayed in the Zoom-OnFly view

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"<font ;5><b><%h%><br><%AM/PM%></b></font>");
	var_Chart->PutZoomOnFlyCaption(_bstr_t("<br><c><b><font ;12><%=%C0 + ' / <fgcolor=00FF00>' + %3%></font></fgcolor></b><br><solidline><upline><b>Start</b>:<%=%1%><br><b") +
">End</b>:<%=%2%><br><b>Duration</b>:<%=round(%2-%1) + ' days'%><br><b>Working</b>:<%='<b>' + int(%258) + '</b> days' + (0:=(%258" +
" - int(%258)) ? (' <fgcolor=FF0000><b>' + round(24 * =:0) + '</b> hours') : '') %>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1416
How can I change the scale in the Zoom-OnFly view

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"<font ;5><b><%h%><br><%AM/PM%></b></font>");
	var_Chart->PutZoomOnFlyCaption(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1415
Is it possible to change the Zoom-OnFly view's background color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->PutBackColorZoomOnFly(RGB(240,240,240));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1414
How can I include the selected items in the Zoom-OnFly view

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::ZoomOnFlyEnum(EXG2ANTTLib::exZoomOnFlyIncludeSelectedItems | EXG2ANTTLib::exZoomOnFly));
	var_Chart->PutSelBackColor(RGB(240,240,240));
	var_Chart->PutSelectOnClick(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T2","T2");
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1413
Is it possible to include the neighbors items in the Zoom-OnFly view

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::ZoomOnFlyEnum(EXG2ANTTLib::exZoomOnFlyIncludeNeighborItems | EXG2ANTTLib::exZoomOnFly));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"T1","T1");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1412
How can I enable the Zoom-OnFly view

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,11,5,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exWeek);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,17,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,18,0,00,00).operator DATE(),COleDateTime(2001,2,24,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1411
I am using the overlay bars on stack, can I somehow tell a type of bar, or a specific bar, to be always on top of all other’s. Like a Z-Index or something

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A1","A1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A3","A3");
	var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarColor,long(65280));
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A31","A31");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A3","A3");
	var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarColor,long(255));
	var_Items->AddBar(var_Items->AddItem(vtMissing),"",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,"The <b>Key</b> of the bar specifies the Z-Order when overlaying.");
spG2antt1->EndUpdate();

1410
Is it possible to specify the z-order when using the overlaying feature

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,17,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"K2","K2");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K3","K3");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,28,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"T2","T2");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,30,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),"T3","T3");
	var_Items->PutItemBar(0,"<T*>",EXG2ANTTLib::exBarColor,long(65280));
	var_Items->PutItemBar(0,"<K*>",EXG2ANTTLib::exBarOverlaidKey,"A");
	var_Items->PutItemBar(0,"<T*>",EXG2ANTTLib::exBarOverlaidKey,"B");
spG2antt1->EndUpdate();

1409
I seen that there is no exBarStartColor, exBarEndColor, similar to exBarColor, is there any solution so I can display a different Start/End Color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Summary",L"Aka1");
		var_Bar->PutStartColor(RGB(255,0,0));
		var_Bar->PutEndColor(RGB(0,0,255));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Summary",L"Aka2");
		var_Bar1->PutStartColor(RGB(0,255,0));
		var_Bar1->PutEndColor(RGB(255,0,255));
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item A");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"B1",vtMissing);
	var_Items->PutItemBar(h,"B1",EXG2ANTTLib::exBarName,"Aka1");
	h = var_Items->AddItem("Item B");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"B2",vtMissing);
	var_Items->PutItemBar(h,"B2",EXG2ANTTLib::exBarName,"Aka2");
spG2antt1->EndUpdate();

1408
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\card.png");
spG2antt1->PutHTMLPicture(L"p2","c:\\exontrol\\images\\sun.png");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragCopySnapShot);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exNoLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exThinLine);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(26);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutColor(0x1000000);
		var_Bar->PutHeight(18);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("<img>p1:32</img>Group 1");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L1");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"L2");
	h = var_Items->AddItem("<img>p2:32</img>Group 2");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	h1 = var_Items->InsertItem(h,vtMissing,"Task");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spG2antt1->EndUpdate();

1407
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\card.png");
spG2antt1->PutHTMLPicture(L"p2","c:\\exontrol\\images\\sun.png");
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
_variant_t var_HTMLPicture = spG2antt1->GetHTMLPicture(L"aka1");
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutDefaultItemHeight(48);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutGridLineColor(RGB(240,240,240));
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetColumns()->GetItem(long(0))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
spG2antt1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`");
spG2antt1->GetColumns()->GetItem(long(0))->PutWidth(112);
spG2antt1->GetColumns()->GetItem(long(1))->PutDef(EXG2ANTTLib::exCellHasCheckBox,long(1));
spG2antt1->GetColumns()->GetItem(long(2))->PutLevelKey("1");
spG2antt1->GetColumns()->GetItem(long(3))->PutLevelKey("1");
spG2antt1->GetColumns()->GetItem(long(4))->PutLevelKey("1");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragCopyImage);
spG2antt1->PutSingleSel(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->GetItemByIndex(1);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(2);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(3);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutCellValue(h,long(1),"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...");
	var_Items->PutCellSingleLine(h,long(1),EXG2ANTTLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(1),EXG2ANTTLib::exHTML);
	var_Items->PutCellHAlignment(h,long(1),EXG2ANTTLib::CenterAlignment);
	var_Items->PutItemDivider(h,1);
	var_Items->PutItemDividerLineAlignment(h,EXG2ANTTLib::DividerTop);
spG2antt1->EndUpdate();

1406
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetColumns()->GetItem(long(2))->PutLevelKey("1");
spG2antt1->GetColumns()->GetItem(long(3))->PutLevelKey("1");
spG2antt1->GetColumns()->GetItem(long(4))->PutLevelKey("1");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragCopyText);
spG2antt1->PutSingleSel(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->GetItemByIndex(1);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(3);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(4);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(5);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutCellValue(h,long(0),"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...");
	var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutCellHAlignment(h,long(0),EXG2ANTTLib::CenterAlignment);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXG2ANTTLib::DividerTop);
spG2antt1->EndUpdate();

1405
Is it possible to change the indentation during the drag and drop
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAny);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exNoLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->PutHasButtons(EXG2ANTTLib::exWPlus);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x1000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->InsertItem(h1,vtMissing,"Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,17,0,00,00).operator DATE(),"K4",vtMissing);
	h2 = var_Items->InsertItem(h1,vtMissing,"Task 3");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L1");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"L2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutExpandItem(h1,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutCellValue(h,long(0),_bstr_t("Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the i") +
"ndentation.");
	var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
spG2antt1->EndUpdate();

1404
Is it possible to allow moving an item to another, but keeping its indentation
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionKeepIndent);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exNoLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exThinLine);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x1000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L1");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"L2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
spG2antt1->EndUpdate();

1403
How can I change the row's position to another, by drag and drop. Is it possible
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPosition);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x1000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L1");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"L2");
spG2antt1->EndUpdate();

1402
Is it possible to scroll the control's content by clicking and moving the mouse up or down

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragScroll);
spG2antt1->EndUpdate();

1401
How can I display bars so they fit the entire height ( height of the row )

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutDefaultItemHeight(36);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutUnitWidth(48);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutNonworkingHours(16253183);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutUnitWidth(16);
	var_Chart->PutFirstVisibleDate(COleDateTime(2012,1,1,8,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->GetBars()->Add(L"Empty")->PutPattern(EXG2ANTTLib::exPatternEmpty);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
		var_Level->PutLabel("<%d2%>");
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutBarsAllowSizing(VARIANT_FALSE);
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"CA")));
		var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"CB")));
		var_Column1->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Address 1.1<br>Line 2.1<br>C1");
	var_Items->PutItemMaxHeight(h,96);
	var_Items->PutCellValue(h,long(1),"Address 1.2<br>Line 2.2<br>C2");
	var_Items->AddBar(h,"Empty",COleDateTime(2012,1,2,8,00,00).operator DATE(),COleDateTime(2012,1,2,19,00,00).operator DATE(),"A","This is a bit of text<br>being <font ;9>displayed ion the <b>bar A");
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarBackColor,long(16777471));
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarHAlignCaption,long(0));
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarVAlignCaption,long(2));
	var_Items->AddBar(h,"Empty",COleDateTime(2012,1,3,8,00,00).operator DATE(),COleDateTime(2012,1,3,19,00,00).operator DATE(),"B","<fgcolor=FFFFFF>This is a bit of text<br><fgcolor=FFFFFF>being <font ;9>displayed ion the <b>bar B");
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarBackColor,long(33488896));
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarHAlignCaption,long(2));
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarVAlignCaption,long(0));
	var_Items->AddBar(h,"Empty",COleDateTime(2012,1,4,8,00,00).operator DATE(),COleDateTime(2012,1,4,19,00,00).operator DATE(),"C","<font Tahoma;12><b>bar C");
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarBackColor,long(33489151));
spG2antt1->EndUpdate();